package com.xy.service.impl;

import com.xy.dao.UserDao;
import com.xy.model.User;
import com.xy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userDao;
    public int addUser(User user) {
        return userDao.addUser(user);
    }

    public int delUser(Integer userid) {
        return userDao.delUser(userid);
    }

    public User getUserByName(String username) {
        return userDao.getUserByName(username);
    }
}
